package vip.buddha.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import vip.buddha.entity.Storage;
import vip.buddha.service.StorageService;

@RestController
public class StorageController {
    @Autowired
    private StorageService storageService;

    @RequestMapping("/storage/list")
    public String list() {
        return "this is storage list api,7001";
    }

    @PutMapping("/storage/{goodsId}")
    public Integer update(@PathVariable("goodsId") Integer goodsId, @RequestBody Storage storage) {
        Integer i = storageService.updateByGoodsId(goodsId, storage);
        return i;
    }
}
